package com.ocean.system.domain;

import java.io.Serializable;

/**
 * 全球海温 NC 文件元数据实体类
 */
public class SeaTempNcMetadata implements Serializable {
    private static final long serialVersionUID = 1L;

    // 对应9项元数据字段
    private String ncFileName;      // NC文件名
    private String source;          // 来源
    private String type;            // 类型
    private String forecastBaseTime;// 起报时间
    private String forecastLeadTime;// 预报时效
    private String forecastFreq;    // 预报频次
    private String coverage;        // 覆盖范围
    private String spatialRes;      // 空间分辨率
    private String elements;        // 预报要素

    // 无参构造
    public SeaTempNcMetadata() {}

    // 全参构造
    public SeaTempNcMetadata(String ncFileName, String source, String type,
                             String forecastBaseTime, String forecastLeadTime,
                             String forecastFreq, String coverage,
                             String spatialRes, String elements) {
        this.ncFileName = ncFileName;
        this.source = source;
        this.type = type;
        this.forecastBaseTime = forecastBaseTime;
        this.forecastLeadTime = forecastLeadTime;
        this.forecastFreq = forecastFreq;
        this.coverage = coverage;
        this.spatialRes = spatialRes;
        this.elements = elements;
    }

    // Getter 和 Setter 方法
    public String getNcFileName() {
        return ncFileName;
    }

    public void setNcFileName(String ncFileName) {
        this.ncFileName = ncFileName;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getForecastBaseTime() {
        return forecastBaseTime;
    }

    public void setForecastBaseTime(String forecastBaseTime) {
        this.forecastBaseTime = forecastBaseTime;
    }

    public String getForecastLeadTime() {
        return forecastLeadTime;
    }

    public void setForecastLeadTime(String forecastLeadTime) {
        this.forecastLeadTime = forecastLeadTime;
    }

    public String getForecastFreq() {
        return forecastFreq;
    }

    public void setForecastFreq(String forecastFreq) {
        this.forecastFreq = forecastFreq;
    }

    public String getCoverage() {
        return coverage;
    }

    public void setCoverage(String coverage) {
        this.coverage = coverage;
    }

    public String getSpatialRes() {
        return spatialRes;
    }

    public void setSpatialRes(String spatialRes) {
        this.spatialRes = spatialRes;
    }

    public String getElements() {
        return elements;
    }

    public void setElements(String elements) {
        this.elements = elements;
    }

    // 重写 toString 方法，保持原有的格式化输出风格
    @Override
    public String toString() {
        return String.format(
                "1. NC文件名：%s%n" +
                        "2. 来源：%s%n" +
                        "3. 类型：%s%n" +
                        "4. 起报时间：%s%n" +
                        "5. 预报时效：%s%n" +
                        "6. 预报频次：%s%n" +
                        "7. 覆盖范围：%s%n" +
                        "8. 空间分辨率：%s%n" +
                        "9. 预报要素：%s%n",
                ncFileName, source, type, forecastBaseTime,
                forecastLeadTime, forecastFreq, coverage,
                spatialRes, elements
        );
    }
}